// 引入静态路由
import { constantRoutes } from '@/router'
const state = {
    // 左侧菜单列表
    menuList: []
}

const mutations = {
    setMenuList(state,asyncRoutes) {
        // 将静态路由和动态路由合并到数组
        state.menuList = [...constantRoutes, ...asyncRoutes]
    }
}

export default {
    // 开启命名空间，不然差找不到相应的模块
    namespaced: true,
    state,
    mutations
}
